package com.example.java.designpattern.singleton;

import com.example.java.designpattern.Divisor;

/**
 * 静态内部类单例
 */
public class IoDHSingleton implements Divisor {

    private IoDHSingleton() {
    }

    @Override
    public void divide(String target) {
    }

    private static class SingletonHolder {
        private static final Divisor INSTANCE = new IoDHSingleton();
    }

    public static Divisor getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
